package com.tjsinfo.tjsoa.address.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.address.personal.TAddresslistPersonal;
import com.tjsinfo.tjsoa.address.personal.TAddresslistPersonalManager;

public class ToPersonalUpdateAction extends Action {
	
    TAddresslistPersonalManager addresslistPersonalManager;
	
	public TAddresslistPersonalManager getAddresslistPersonalManager() {
		return addresslistPersonalManager;
	}

	public void setAddresslistPersonalManager(
			TAddresslistPersonalManager addresslistPersonalManager) {
		this.addresslistPersonalManager = addresslistPersonalManager;
	}
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		try {
			Integer id=Integer.valueOf(request.getParameter("id")).intValue();
			TAddresslistPersonal personalFind=new TAddresslistPersonal();
			personalFind=addresslistPersonalManager.findByID(id);
			request.setAttribute("personalFind",personalFind);
		
			
			return mapping.findForward("success");
		}catch (Exception e) {
			e.printStackTrace();
			return mapping.findForward("failure");
		}
	}
}

